<?php

declare(strict_types=1);

namespace app\shop\model;

use sheep\model\Common;
use think\model\concern\SoftDelete;

class PayConfig extends Common
{
    use SoftDelete;

    protected $name = 'shop_pay_config';

    protected $type = [
        'params' => 'json',
        'delete_time' => 'timestamp'
    ];

    // 追加属性
    protected $append = [
        'type_text',
        'status_text'
    ];

    protected $hidden = [
        'params'
    ];

    public function statusList()
    {
        return [
            'normal' => '正常',
            'disabled' => '禁用',
        ];
    }


    public function typeList()
    {
        return [
            'wechat' => '微信支付',
            'alipay' => '支付宝支付',
        ];
    }
}
